package com.hxkj.service.impl;


import com.hxkj.dao.CompanyinfoDao;
import com.hxkj.domain.po.Companyinfo;
import com.hxkj.service.OptionCompanyService;
import com.integral.mall.file.service.SysFileService;
import com.platform.common.domain.result.ResultDataStruct;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 合作公司解析实现类
 * <p>
 * Created by yaosy on 2018年6月19日09:27:00
 */
@Service
@Slf4j
public class OptionCompanyServiceImpl implements OptionCompanyService {

    private static final Logger LOGGER = LoggerFactory.getLogger(OptionCompanyServiceImpl.class);

    @Autowired
    private CompanyinfoDao companyinfoDao;

    @Override
    public ResultDataStruct<List<Companyinfo>> analyzeOption(Companyinfo companyinfo) {
        ResultDataStruct<List<Companyinfo>> resultDataStruct = new ResultDataStruct();
        try{
            List<Companyinfo>  companyinfoList = companyinfoDao.get(companyinfo);
            resultDataStruct.setData(companyinfoList);
        }catch(Exception e){
            e.printStackTrace();
        }
        return resultDataStruct;
    }
}
